package com.huoshan.im.server.messaging;

import online.chazi.netkit.messaging.Message;
import online.chazi.netkit.messaging.MessageEncrypt;
import org.springframework.stereotype.Component;

/**
 * 说明：消息加密和解密
 * Created by 火山九日 on 2020-04-26 10:59
 */
@Component
public class MessageEncryptor implements MessageEncrypt {

    public Message encode(Message message) {

        //进行加码
        if (message.getExtension() == 0) {
            //todo
        }
        return message;

    }

    public Message decode(Message message) {

        //进行解密
        if (message.getExtension() == 0) {
            //todo
        }
        return message;

    }

}
